package com.ruoyi.expert.service.impl;

import com.ruoyi.common.utils.DateUtils;

import com.ruoyi.expert.domain.ExpertProduction;
import com.ruoyi.expert.mapper.ExpertProductionMapper;
import com.ruoyi.expert.service.IExpertProductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 专家类表Service业务层处理
 *
 * @author ruoyi
 * @date 2022-03-10
 */
@Service
public class ExpertProductionServiceImpl implements IExpertProductionService
{
    @Autowired
    private ExpertProductionMapper expertProductionMapper;

    /**
     * 查询专家类表
     *
     * @param expertdbId 专家类表主键
     * @return 专家类表
     */
    @Override
    public ExpertProduction selectExpertProductionByExpertdbId(Long expertdbId)
    {
        return expertProductionMapper.selectExpertProductionByExpertdbId(expertdbId);
    }

    /**
     * 查询专家类表列表
     *
     * @param expertProduction 专家类表
     * @return 专家类表
     */
    @Override
    public List<ExpertProduction> selectExpertProductionList(ExpertProduction expertProduction)
    {
        return expertProductionMapper.selectExpertProductionList(expertProduction);
    }

    /**
     * 新增专家类表
     *
     * @param expertProduction 专家类表
     * @return 结果
     */
    @Override
    public int insertExpertProduction(ExpertProduction expertProduction)
    {
        expertProduction.setCreateTime(DateUtils.getNowDate());
        return expertProductionMapper.insertExpertProduction(expertProduction);
    }

    /**
     * 修改专家类表
     *
     * @param expertProduction 专家类表
     * @return 结果
     */
    @Override
    public int updateExpertProduction(ExpertProduction expertProduction)
    {
        expertProduction.setUpdateTime(DateUtils.getNowDate());
        return expertProductionMapper.updateExpertProduction(expertProduction);
    }

    /**
     * 批量删除专家类表
     *
     * @param expertdbIds 需要删除的专家类表主键
     * @return 结果
     */
    @Override
    public int deleteExpertProductionByExpertdbIds(Long[] expertdbIds)
    {
        return expertProductionMapper.deleteExpertProductionByExpertdbIds(expertdbIds);
    }

    /**
     * 删除专家类表信息
     *
     * @param expertdbId 专家类表主键
     * @return 结果
     */
    @Override
    public int deleteExpertProductionByExpertdbId(Long expertdbId)
    {
        return expertProductionMapper.deleteExpertProductionByExpertdbId(expertdbId);
    }
}
